Socket
Socket
Sign inDemoInstall

to-string-x

Package Overview
Dependencies
Maintainers
1
Versions
53
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

to-string-x

ES6-compliant shim for ToString.


Version published
Weekly downloads
4.9K
increased by28.78%
Maintainers
1
Weekly downloads
 
Created
Source

Travis status Dependency status devDependency status npm version

to-string-x

ES6-compliant shim for ToString.

See: 7.1.12 ToString ( argument )
Version: 1.4.5
Author: Xotic750 Xotic750@gmail.com
License: MIT
Copyright: Xotic750

module.exports(value)string

The abstract operation ToString converts argument to a value of type String.

Kind: Exported function
Returns: string - The converted value.
Throws:

  • TypeError If value is a Symbol.
ParamTypeDescription
value*The value to convert to a string.

Example

var $toString = require('to-string-x');

$toString(); // 'undefined'
$toString(null); // 'null'
$toString('abc'); // 'abc'
$toString(true); // 'true'
$toString(Symbol('foo')); // TypeError
$toString(Symbol.iterator); // TypeError
$toString(Object(Symbol.iterator)); // TypeError
$toString(Object.create(null)); // TypeError

Keywords

FAQs

Package last updated on 24 Feb 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc